﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter14.Code05.Code02.Example04
{
    public class Demo
    {
        public static void Begin()
        {
            string sentence = "'twas brillig, and the slithy toves did gyre adn gimble in the wabe:";
            List<string> words;
            words = WordProcessor.GetWords(sentence);
            Console.WriteLine("Original sentence:");
            foreach (string word in words)
            {
                Console.Write(word);
                Console.Write(' ');
            }
            Console.WriteLine('\n');

            words = WordProcessor.GetWords(sentence, reverseWords: true, capitalizeWords: true);
            foreach (string word in words)
            {
                Console.Write(word);
                Console.Write(' ');
            }
            Console.ReadLine();
        }
    }
}
